/*
 * Copyright (C) 2023 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.xuexiang.templateproject.bean;

//import anet.channel.strategy.dispatch.DispatchConstants;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class FunctionItem {
    @NotNull
    private final Action action;
    @NotNull
    private final Component component;
    @NotNull
    private final String itemName;
    private final int positionId;

    public FunctionItem(@NotNull Component component, @NotNull String itemName, int i2, @NotNull Action action) {
        Intrinsics.checkNotNullParameter(component, "component");
        Intrinsics.checkNotNullParameter(itemName, "itemName");
        Intrinsics.checkNotNullParameter(action, "action");
        this.component = component;
        this.itemName = itemName;
        this.positionId = i2;
        this.action = action;
    }

    public static /* synthetic */ FunctionItem copy$default(FunctionItem functionItem, Component component, String str, int i2, Action action, int i3, Object obj) {
        if ((i3 & 1) != 0) {
            component = functionItem.component;
        }
        if ((i3 & 2) != 0) {
            str = functionItem.itemName;
        }
        if ((i3 & 4) != 0) {
            i2 = functionItem.positionId;
        }
        if ((i3 & 8) != 0) {
            action = functionItem.action;
        }
        return functionItem.copy(component, str, i2, action);
    }

    @NotNull
    public final Component component1() {
        return this.component;
    }

    @NotNull
    public final String component2() {
        return this.itemName;
    }

    public final int component3() {
        return this.positionId;
    }

    @NotNull
    public final Action component4() {
        return this.action;
    }

    @NotNull
    public final FunctionItem copy(@NotNull Component component, @NotNull String itemName, int i2, @NotNull Action action) {
        Intrinsics.checkNotNullParameter(component, "component");
        Intrinsics.checkNotNullParameter(itemName, "itemName");
        Intrinsics.checkNotNullParameter(action, "action");
        return new FunctionItem(component, itemName, i2, action);
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof FunctionItem)) {
            return false;
        }
        FunctionItem functionItem = (FunctionItem) obj;
        return Intrinsics.areEqual(this.component, functionItem.component) && Intrinsics.areEqual(this.itemName, functionItem.itemName) && this.positionId == functionItem.positionId && Intrinsics.areEqual(this.action, functionItem.action);
    }

    @NotNull
    public final Action getAction() {
        return this.action;
    }

    @NotNull
    public final Component getComponent() {
        return this.component;
    }

    @NotNull
    public final String getItemName() {
        return this.itemName;
    }

    public final int getPositionId() {
        return this.positionId;
    }

    public int hashCode() {
        return (((((this.component.hashCode() * 31) + this.itemName.hashCode()) * 31) + this.positionId) * 31) + this.action.hashCode();
    }

    @NotNull
    public String toString() {
        return "FunctionItem(component=" + this.component + ", itemName=" + this.itemName + ", positionId=" + this.positionId + ", action=" + this.action + ')';
    }
}